import request from '@/utils/request'

interface paramsData {
  devId: string,
  data?:string
}

// 喷淋运行时间设置
export function setSprayRunningTimeApi (data?: paramsData) {
  return request({
    url: '/jjy/api/Data/SetSprayRunTime',
    method: 'post',
    data: data
  })
}

// 喷淋延时时间设定
export function setSprayDelayApi (data?: paramsData) {
  return request({
    url: '/jjy/api/Data/SetSprayDelayTime',
    method: 'post',
    data: data
  })
}

// 设置停止明火煤
export function setFlameStopApi (data?: paramsData) {
  return request({
    url: '/jjy/api/Data/CoalStopMode',
    method: 'post',
    data: data
  })
}

// 设置明火煤手动模式
export function setFlameHandApi (data?: paramsData) {
  return request({
    url: '/jjy/api/Data/CoalManualMode',
    method: 'post',
    data: data
  })
}

// 设置明火煤自动模式
export function setFlameAutomaticApi (data?: paramsData) {
  return request({
    url: '/jjy/api/Data/CoalAutoMode',
    method: 'post',
    data: data
  })
}

// 设置喷淋装置开
export function setSprayStartApi (data?: paramsData) {
  return request({
    url: '/jjy/api/Data/SprayManualOn',
    method: 'post',
    data: data
  })
}

// 设置喷淋装置关
export function setSprayStopApi (data?: paramsData) {
  return request({
    url: '/jjy/api/Data/SprayManualOff',
    method: 'post',
    data: data
  })
}

// 自动模式测试
export function AutomaticModeTestApi (data?: paramsData) {
  return request({
    url: '/jjy/api/Data/AutoModeTest',
    method: 'post',
    data: data
  })
}

// 设置初始化
export function getFlameCoalDaApi (data?: paramsData) {
  return request({
    url: '/mqtt/api/Data/Reset',
    method: 'post',
    data: data
  })
}